Skip to content

Conversation

@da-viper
Copy link
Contributor

Show the expected value in the error message so we can see the expected value without searching through the log messages.

Related #141689

show the expected value in the error message so we can see the expected
value without searching through the log messages.
@llvmbot
Copy link
Member

llvmbot commented May 29, 2025

@llvm/pr-subscribers-lldb

Author: Ebuka Ezike (da-viper)

Changes

Show the expected value in the error message so we can see the expected value without searching through the log messages.

Related #141689


Full diff: https://github.com/llvm/llvm-project/pull/142030.diff

1 Files Affected:

  • (modified) lldb/test/API/tools/lldb-dap/optimized/TestDAP_optimized.py (+6-1)
diff --git a/lldb/test/API/tools/lldb-dap/optimized/TestDAP_optimized.py b/lldb/test/API/tools/lldb-dap/optimized/TestDAP_optimized.py
index ae144ebdca46b..ba6da9469c204 100644
--- a/lldb/test/API/tools/lldb-dap/optimized/TestDAP_optimized.py
+++ b/lldb/test/API/tools/lldb-dap/optimized/TestDAP_optimized.py
@@ -45,9 +45,14 @@ def test_optimized_variable(self):
         self.continue_to_breakpoints(breakpoint_ids)
         optimized_variable = self.dap_server.get_local_variable("argc")
 
-        self.assertTrue(optimized_variable["value"].startswith("<error:"))
+        expected_value: str = optimized_variable["value"]
+        self.assertTrue(
+            expected_value.startswith("<error:"),
+            f"expect error for value: '{expected_value}'",
+        )
         error_msg = optimized_variable["$__lldb_extensions"]["error"]
         self.assertTrue(
             ("could not evaluate DW_OP_entry_value: no parent function" in error_msg)
             or ("variable not available" in error_msg)
         )
+        self.continue_to_exit()

@da-viper da-viper removed the lldb label May 29, 2025
@da-viper da-viper changed the title [lldb][lldb-dap][test] show the expected value in the error message. [NFC][lldb][lldb-dap][test] show the expected value in the error message. May 29, 2025
@da-viper
Copy link
Contributor Author

will wait for the PR build bot in case it catches it before pushing to main.

@llvmbot llvmbot added the lldb label May 29, 2025
@da-viper da-viper merged commit 8a44cd7 into llvm:main May 29, 2025
7 of 9 checks passed
@da-viper da-viper deleted the add-test-error-message branch May 30, 2025 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants